package com.example.demo.web;

import com.example.demo.service.MyProcessModelService;
import com.example.demo.service.MyProcessService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author: njz
 * @Description:
 * @Date: create in 2022/2/11 11:06
 */

@RequestMapping("/api/process-model")
@RestController
@Api("流程模型练习")
public class ProcessModelController {

    @Resource
    private MyProcessModelService myProcessModelService;

    @PutMapping("/deploy/{modelId}")
    @ApiOperation("部署流程")
    public ResponseEntity<String> deployProcessModel(@PathVariable String modelId){
        return ResponseEntity.ok(myProcessModelService.deployProcessModel(modelId));
    }

}
